package com.weiyin.examination.module;

import android.graphics.RectF;
import android.graphics.Region;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * author:njf
 * date: On2018/1/26
 */

public class CourseA2Module implements Parcelable{
    private Region region;
    private RectF rectF;

    public CourseA2Module(Region region, RectF rectF){
        this.rectF = rectF;
        this.region =region;
    }
    protected CourseA2Module(Parcel in) {
        region = in.readParcelable(Region.class.getClassLoader());
        rectF = in.readParcelable(RectF.class.getClassLoader());
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(region, flags);
        dest.writeParcelable(rectF, flags);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<CourseA2Module> CREATOR = new Creator<CourseA2Module>() {
        @Override
        public CourseA2Module createFromParcel(Parcel in) {
            return new CourseA2Module(in);
        }

        @Override
        public CourseA2Module[] newArray(int size) {
            return new CourseA2Module[size];
        }
    };

    public void setRectF(RectF rectF) {
        this.rectF = rectF;
    }

    public void setRegion(Region region) {
        this.region = region;
    }

    public RectF getRectF() {
        return rectF;
    }

    public Region getRegion() {
        return region;
    }
}

